package core.factory
{
	import core.object.DropObject;
	import core.manager.SpriteSheetManager;

	public class PropFactory
	{
		public function PropFactory()
		{
		}
		
		public static function generate():DropObject {
			var props:Array = SpriteSheetManager.instance.props;// 道具列表
			var index:int = Math.floor(Math.random() * props.length);
			var object:Object = props[index];
			object.id = 2011;
			var dropObject:DropObject = new DropObject(object.id);
			/*for each(var object:Object in props){
				var probability:Number = object.probability;
				if(Math.random() < probability){
					// TODO 
				}
			}*/
			trace(object.description);
			return dropObject;
		}
	}
}